package com.enlorenz.support.jackson;

import com.enlorenz.core.enu.BaseEnum;
import com.enlorenz.core.enu.EnumObject;


/**
 * 基础枚举数据转换
 * 将基础枚举转为枚举的pojo对象
 * @author Karma
 *
 */
public class BaseEnumDataTransfer implements IDataTransfer{
	@Override
	public boolean isAdpat(Object data) {
		if(data instanceof BaseEnum){
			return true;
		}
		return false;
	}

	@Override
	public Object transfer(Object data) {
		BaseEnum<?> be=(BaseEnum<?>)data;
		return new EnumObject(be);
	}
}
